package com.enlorenz.core.channel.socket.common.dstroute.category;

import java.nio.channels.SocketChannel;

import com.enlorenz.core.channel.common.dstobj.IDstRoute;


/**
 * NioSocket的通道
 * @author lcb
 */
public class NioDstRoute implements IDstRoute{
	private SocketChannel socketChannel;
	
	public NioDstRoute(SocketChannel socketChannel) {
		super();
		this.socketChannel = socketChannel;
	}

	@Override
	public Object getConnSource() {
		return socketChannel;
	}

	@Override
	public void setConnSource(Object object) {
		this.socketChannel=(SocketChannel)object;
	}
	
	public String toString(){
		return socketChannel.toString();
	}
	
	public int hashCode(){
		return socketChannel.hashCode();
	}

	@Override
	public boolean equals(Object arg0) {
		return socketChannel.equals(arg0);
	}
	
	
}
